package com.d3works.apps.project.service;

import com.d3works.apps.base.db.Timer;
import com.d3works.apps.base.db.TimerHistory;
import com.d3works.apps.project.db.ProjectTask;
import com.d3works.exception.D3worksException;
import java.time.Duration;
import java.time.LocalDateTime;

public interface TimerProjectTaskService {

  Timer find(ProjectTask task);

  TimerHistory start(ProjectTask task, LocalDateTime dateTime) throws D3worksException;

  TimerHistory stop(ProjectTask task, LocalDateTime dateTime) throws D3worksException;

  void cancel(ProjectTask task) throws D3worksException;

  Duration compute(ProjectTask task);
}
